import {
  createRouter,
  createWebHashHistory, // hash模式
  createWebHistory, // history模式
} from "vue-router";

import Login from "../views/Login/index.vue";
import Home from "../views/Home/index.vue";
import Register from "../views/Register/index.vue";

// 定义路由配置
const routes = [
  {
    path: "/login",
    component: Login,
    name: "Login",
  },
  {
    path: "/register",
    component: Register,
    name: "Register",
  },
  {
    path: "/",
    component: Home,
    name: "Home",
  },
];

export default createRouter({
  history: createWebHistory(),
  routes,
});
